package com.framework.modules.YhbUser.controller;

import com.framework.exception.util.RespResult;
import com.framework.modules.sys.controller.AbstractController;
import com.framework.page.PageUtils;
import com.framework.service.yhbservice.YhbUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 后台用户模块
 */
@RestController
@RequestMapping("sys/yhbUser")
public class YhbUserController extends AbstractController {


    @Autowired
    private YhbUserService yhbUserService;

    /**
     * 用户列表
     * @param params
     * @return
     */
    @RequestMapping("list")
    public RespResult list(@RequestParam Map<String,Object> params){
        params.put("sysUserId",getDeptUserId());
        PageUtils page=yhbUserService.queryUserList(params);

        return RespResult.ok().put("page",page);
    }
}
